home *** CD-ROM | disk | FTP | other *** search
/ Champak 33 / Volume 33 - JOGO DISK .iso / Games / protect_the_fire.swf / scripts / DefineSprite_230 / frame_19 / DoAction.as
Text File  |  2007-01-15  |  1KB  |  37 lines

  1. if(_name eq "player")
  2. {
  3.    setProperty("../nut", _rotation, _rotation);
  4.    ratio = getProperty("../pline", _currentframe) / getProperty("../pline", _totalframes);
  5.    setProperty("../nut", _X, _X - getProperty("../cline", _width));
  6.    if("0" < _rotation)
  7.    {
  8.       setProperty("../nut", _Y, _Y - getProperty("../cline", _height));
  9.    }
  10.    else
  11.    {
  12.       setProperty("../nut", _Y, _Y + getProperty("../cline", _height));
  13.    }
  14.    tellTarget("../nutcentral")
  15.    {
  16.       gotoAndPlay(2);
  17.    }
  18. }
  19. else
  20. {
  21.    setProperty("../../nut2", _rotation, getProperty("../", _rotation) + "180");
  22.    setProperty("../../cline", _rotation, getProperty("../", _rotation));
  23.    setProperty("../../nut2", _X, getProperty("../", _X) + getProperty("../../cline", _width) * "1");
  24.    if(getProperty("../", _rotation) < "0")
  25.    {
  26.       setProperty("../../nut2", _Y, getProperty("../", _Y) - getProperty("../../cline", _height) * "1");
  27.    }
  28.    else
  29.    {
  30.       setProperty("../../nut2", _Y, getProperty("../", _Y) + getProperty("../../cline", _height) * "1");
  31.    }
  32.    tellTarget("../../compnutcentral")
  33.    {
  34.       gotoAndPlay(2);
  35.    }
  36. }
  37.